<%@ page language="java" pageEncoding="UTF-8"%>
<%@page import="com.tjsinfo.tjsoa.meetingroom.vo.MeetingRoomEmploy"%>
<%@page import="com.tjsinfo.tjsoa.system.vo.TSystemUser"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.util.ArrayList"%>
<%@page import="com.tjsinfo.tjsoa.meetingroom.vo.MeetingRoomFileUpload"%>
<%@page import="java.util.Iterator"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	String meetingName=(String)request.getAttribute("meetingName");
	MeetingRoomEmploy roomempoly=(MeetingRoomEmploy)request.getAttribute("roomemploy");
	ArrayList<MeetingRoomFileUpload> fileList=(ArrayList<MeetingRoomFileUpload>)request.getAttribute("fileList");
	TSystemUser user=(TSystemUser)request.getAttribute("applicationUser");
	SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<base href="<%=basePath%>" />
		<title>天津市粮油集团有限公司</title>
		
		<link rel="stylesheet" type="text/css" href="<%=basePath%>ajaxFramework/ext-2.1/resources/css/ext-all.css" />
		<script type="text/javascript" src="<%=basePath%>ajaxFramework/ext-2.1/adapter/ext/ext-base.js"></script>
	  	<script type="text/javascript" src="<%=basePath %>ajaxFramework/ext-2.1/ext-all.js"></script>
		<script type="text/javascript" src="<%=basePath %>ajaxFramework/ext-2.1/source/locale/ext-lang-zh_CN.js"></script>
		<link href="<%=basePath%>style/txlz7.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript">
	    function submitYes(){
		    if(document.getElementById('minutes').value!='' && document.getElementById('minutes').value.length>400){
		    	Ext.MessageBox.alert('提示框','<nobr>审批意见不得大于400字</nobr>');
		    	return;
		    }
			document.form1.action="<%=basePath%>tjsinfo/tjsoa/meetingroom/empolyResults.do?result=1" ;
            form1.submit();            
		}
		function submitNo(){
			if(document.getElementById('minutes').value!='' && document.getElementById('minutes').value.length>400){
		    	Ext.MessageBox.alert('提示框','<nobr>审批意见不得大于400字</nobr>');
		    	return;
		    }
			document.form1.action="<%=basePath%>tjsinfo/tjsoa/meetingroom/empolyResults.do?result=2" ;
            form1.submit();
		}
		function back()
		{
			history.back(-1);
		}
		window.onload = function(){
			document.getElementById("indexDiv").style.height = document.body.clientHeight-35;
			document.getElementById("right").style.height = document.body.clientHeight;
			document.getElementById("tableid").style.height = document.body.clientHeight-40;
			var tb = new Ext.Toolbar(
				{
					height:25
				}
			);
		
		    tb.render('menu');
			tb.add(
		    {
		            text:'同意',
		            iconCls: 'daohang',
		        	handler: function(){
		        		submitYes();
					}
		    },
		    {
		            text:'拒绝',
		            iconCls: 'daohang',
		        	handler: function(){
		        		submitNo();
					}
		    },
		    {
		            text:'返回',
		            iconCls: 'daohang',
		        	handler: function(){
		        		back();
					}
		    }
		    );
			tb.addFill();
		    tb.addText('<img id="windowResize" src="<%=basePath%>images/m_icon05.gif;"><a style="font-weight:bold; color:black;line-height: 22px;">会议审批</a>&nbsp;&nbsp;&nbsp;');
		}
    </script>
	</head>
	<body>
			<form action="<%=basePath%>tjsinfo/tjsoa/meetingroom/empolyResults.do" method="post" name="form1">
				<input type="hidden" id="employId" name="employId" value="<%=roomempoly.getId() %>"/>
				<div id="right">
					<div id="menu" style="padding-top:4px;"></div>
					<div id="indexDiv" style="overflow-y: scroll;overflow-x: hidden">
					<table width="100%" border="0" cellspacing="0" cellpadding="0" id="tableid">
						<tr>
							<td valign="top" height="100%">
								<div class="contabwd">
									<table width="100%" height="400" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td width="90%">
												<table border="0" cellspacing="0" cellpadding="0"
													align="left" style="margin-top: 10px; margin-left: 20px">
													<tr>
														<td>
															<table border="0" align="left" cellpadding="0" cellspacing="0" class="ttaabb">
																<tr>
																	<td width="30%" align="right">
																		<img src="images/dfdf_03.gif" />
																		&nbsp;会议名称:
																	</td>
																	<td width="60%">
																	<input readonly="readonly" value="<%=roomempoly.getMeetingName() %>" type="text" size="41" style="border: 1px #C0C0C0 solid; background: #F4F4F4; height: 19px" />
																	</td>
																	<td width="10%">
																		&nbsp;
																	</td>
																</tr>
																<tr>
																	<td width="30%" align="right">
																		<img src="images/dfdf_03.gif" />
																		&nbsp;所在会议室:
																	</td>
																	<td width="60%">
																	<input readonly="readonly" value="<%=roomempoly.getMeetingRoomMain().getMeetingroomName() %>" type="text" size="41"
																			style="border: 1px #C0C0C0 solid; background: #F4F4F4; height: 19px" />
																	</td>
																	<td width="10%">
																		&nbsp;
																	</td>
																</tr>
																<tr>
																	<td width="30%" align="right">
																		<img src="images/dfdf_03.gif" />
																		&nbsp;申请人及部门:
																	</td>
																	<td width="60%">
																	<input readonly="readonly" value="<%=user.getUserName() %>&nbsp;&nbsp;<%=roomempoly.getBumen() %>" type="text" size="41"
																			style="border: 1px #C0C0C0 solid; background: #F4F4F4; height: 19px" />
																		
																	</td>
																	<td width="10%">
																		&nbsp;
																	</td>
																</tr>
																<tr>
																	<td align="right">
																		<img src="images/dfdf_03.gif" />
																		&nbsp;计划开始时间:
																	</td>
																	<td>
																		<input readonly="readonly" value="<%=sdf.format(roomempoly.getStartTime()) %>" type="text" size="41"
																			style="border: 1px #C0C0C0 solid; background: #F4F4F4; height: 19px"/>
																	</td>
																	<td>
																		&nbsp;
																	</td>
																</tr>
																<tr>
																	<td align="right">
																		<img src="images/dfdf_03.gif" />
																		&nbsp;持续时间:
																	</td>
																	<td>
																		<input readonly="readonly" value="<%=roomempoly.getEndTime() %>小时" type="text" size="41"
																			style="border: 1px #C0C0C0 solid; background: #F4F4F4; height: 19px"/>
																	</td>
																	<td>
																		&nbsp;
																	</td>
																</tr>
																<tr>
																	<td align="right">
																		<img src="images/dfdf_03.gif" />
																		&nbsp;会议时间段:
																	</td>
																	<td>
																		<input id="remarks" name="remarks" value="<%=roomempoly.getRemarks() %>" readonly="readonly"
																		style="border: 1px #C0C0C0 solid; background: #F4F4F4; height: 19px"/>
																	</td>
																	<td>
																		&nbsp;
																	</td>
																</tr>
																<%
																if(fileList!=null && fileList.size()>0){
																%>
																<tr>
																	<td align="right">
																		<img src="images/dfdf_03.gif" />
																		&nbsp;文件下载:
																	</td>
																	<td>
																		<table width="400px" border="0" cellspacing="0">
																		<tr>
																			<td width="400px" cellpadding="0" cellspacing="0" class="ttaabb" style="font-weight:normal">
																		<%
																			for (Iterator iterator = fileList.iterator(); iterator.hasNext();) {
																				MeetingRoomFileUpload file = (MeetingRoomFileUpload) iterator.next();
																		%>
																			<a href="<%=basePath %>tjsinfo/tjsoa/meetingroom/ioAction.do?id=<%=file.getUuid()%>"><%=file.getOldFileName()%></a>&nbsp;&nbsp;&nbsp;
																		<%
																		}
																		%>
																			</td>
																		</tr>
																		</table>
																	</td>
				
																</tr>
																<%	
																}
																%>
																<tr>
																	<td align="right">
																		<img src="images/dfdf_03.gif" />
																		&nbsp;参会人:
																	</td>
																	<td>
																		<textarea readonly="readonly" cols="69" rows="4" style="border: 1px #C0C0C0 solid; background: #F4F4F4;"><%=meetingName %></textarea>
																	</td>
				
																</tr>
																<tr>
																	<td align="right">
																		<img src="images/dfdf_03.gif" />
																		&nbsp;内容及特殊需要:
																	</td>
																	<td>
																		<textarea name="content" cols="69" rows="10" style="border: 1px #C0C0C0 solid; background: #F4F4F4;"><%=roomempoly.getMeetingContent() %></textarea>
																	</td>
																	<td>
																		&nbsp;
																	</td>
																</tr>
																<%
																if(roomempoly.getLingdao()!=null && !"".equals(roomempoly.getLingdao())){
																%>
																<tr>
																	<td align="right">
																		<img src="images/dfdf_03.gif" />
																		&nbsp;参加领导:
																	</td>
																	<td>
																		<input id="lingdao" name="lingdao" value="<%=roomempoly.getLingdao() %>" readonly="readonly" style="border: 1px #C0C0C0 solid; background: #F4F4F4; height: 19px" size="41"/>
																	</td>
				
																</tr>
																<%	
																}
																%>
																<tr>
																	<td align="right">
																		<img src="images/dfdf_03.gif" />
																		&nbsp;审批意见:
																	</td>
																	<td>
																		<textarea id="minutes" name="minutes" cols="69" rows="3" style="border: 1px #C0C0C0 solid; background: #F4F4F4;"></textarea>
																	</td>
																	<td>
																		&nbsp;
																	</td>
																</tr>
																<tr>
																	<th colspan="3">
																		&nbsp;
																	</th>
																</tr>
															</table>
														</td>
													</tr>
												</table>
											</td>
										</tr>
									</table>
								</div>
							</td>
						</tr>
					</table>
					</div>
				</div>
			</form>
	</body>
</html>
